package v9.assist.access

import kotlinx.coroutines.script.Block
import kotlinx.coroutines.script.CComponents
import kotlinx.coroutines.script.GComponents
import v9.assist.analyst.blockMapMonsterEssenceBtn
import v9.assist.analyst.bsBtnCloseable
import v9.assist.analyst.bsBtnSceneEnter
import v9.assist.analyst.cacheSceneEnterBlock
import v9.assist.analyst.npcAssistBlock

const val btnMedicine = "药水"
const val btnRocker = "摇杆"
const val btnInteract = "交互"
const val btnAtk = "普攻"
const val btnSkillA = "技能A"
const val btnSkillB = "技能B"
const val btnSkillC = "技能C"
const val btnSkillD = "技能D"
const val btnSkillE = "技能E"
const val btnSkillF800 = "技能F姿态"
const val btnSkillF800b = "技能F姿态B"
const val btnInviteConfirm = "邀请确认"
const val btnInviteCancel = "邀请取消"
const val btnReviveInHere = "原地复活"
const val btnReviveInCity = "城镇中复活"
const val btnReviveInCenter = "古堡复活"
const val btnRDSceneFastAgain = "随机快速再开"
const val btnSceneStartEnter = "副本组队进入"
const val btnSceneStartEnterClose = "副本组队进入[关闭]"
const val btnScreenCenter = "中心点"
const val btnSkipAnim = "跳过动画"
const val btnPopTxtCancel = "弹窗取消"
const val btnPopTxtConfirm = "弹窗确认"
const val btnInviteBlackClose = "暗影邀请关闭"
//const val btnAtvConfirm = "活动确认"
const val btnApplyAccept = "申请列表同意全部"
const val btnApplyRefuse = "申请列表拒绝全部"
const val btnSelectRole = "选择角色"
const val btnExitRole = "退出角色到游戏主页"
const val btnCloseable = "关闭按钮"
const val btnRandomBuff = "随即效果按钮"
const val btnApplyMenu = "申请按钮"
const val btnApplyPopMenu = "申请列表弹出菜单"
const val btnNetError ="断网重连"
const val btnBlacksmithStart = "装备分解"
const val btnBlacksmithSubmit = "分解"
const val btnCastleBlacksmithClose = "古堡无尽分解关闭"
const val btnSceneRestart = "再次挑战"
const val btnSceneRestartClose = "再次挑战关闭"
const val btnSceneImmRestart = "秘境再次挑战"
const val btnSceneStartNormal = "副本普通难度"
const val btnSceneStartHard = "副本远古难度"
const val btnCenterTop = "顶部中心"
const val btnSceneExitLarge = "副本退出(大)"
const val btnSceneExit = "副本退出"
const val btnReviveByOtherAccept = "(弹窗确认)or接受复活"
const val btnReviveByOtherCancel = "(弹窗取消)or放弃复活"
const val btnImmBackEnter = "秘境返回进入"
const val btnImmFastRestart = "重刷秘境"
const val btnEditFriendClose = "好友编辑关闭"
const val btnCastleEnterMode2 = "城堡进入模式2"
const val btnSceneInviteGroupAllClose = "副本邀请组队总览关闭"
const val btnMenuPackage = "背包"
const val btnMenuPackageTab3 = "背包材料"
const val btnMenuPetPack = "宠物背包"
const val btnMenuPetBlacksmith = "宠物背包装备分解"
const val btnMenuPetBlacksmithSubmit = "宠物背包装备分解提交"
const val btnImmKeyPos = "背包蓝钥匙"
const val btnMenuKeyToEnter = "前往秘境"
const val btnPopApplyClose = "申请列表关闭"
const val btnReopenGame = "打开游戏"
const val btnReopenGameRole = "点击选取角色"
const val btnImmDailySign = "秘境每日签到"
const val btnImmCheckPart2 = "秘境入口按钮检测"
const val btnImmBuffCenter = "不朽词条按钮"
const val btnImmBuffSkip = "不朽词条跳过"
const val btnImmKeyCancel = "不朽钥匙取消"
const val btnMYStart = "魔域迷踪开始"
const val btnTzCheckPart2 = " 挑战秘境入口按钮检测"
const val btnTzNext = "挑战秘境下一层"
const val btnTzNextPre = "挑战秘境下一层Pre"
const val btnMenuMain = "主菜单"
const val mainMenuXianZu = "先祖手记"
const val btnMenuXianZuBaoDianA = "先祖宝典A" // 有3个 没完成启程之章
const val btnMenuXianZuBaoDianB = "先祖宝典B"
const val btnMenuXianZuBaoDianTopA = "先祖宝典置顶A"
const val btnMenuXianZuBaoDianTopB = "先祖宝典置顶B"
const val btnMenuLXDot = "裂隙菜单"
const val btnLXUse = "裂隙开启"
const val btnLxAtvTipClose = "裂隙弹窗活动关闭"
const val btnPathfinding = "继续自动寻路"
const val btnLxTempEnter1 = "临时进入1"
const val btnLxTempEnter2 = "临时进入2"
const val btnMenuSettings = "设置"
const val btnMenuGroup = "组队"
const val btnMenuGroupQuickStart = "快速匹配"
const val btnMenuSwitchRole = "切换角色"
const val btnMYBLMenuFJ = "堡垒装备分解"
const val btnMYBLMenuFJSubmit = "堡垒装备分解提交"
const val btnMYBLMenuJH = "上交梦魇精华"
const val btnMYBLOpenState = "打开梦魇状态"
const val btnSceneHideState = "关闭副本状态"
const val btnSceneOpenState = "打开副本状态"
const val btnSmallMap = "小地图"
const val btnMapGlassToOpen = "地图搜索展开"
const val btnMapGlassOpened = "地图搜索(已展开)"
const val btnMapGuideItem1 = "地图指引条目1"
const val btnMapGoTarget = "地图前往此处"
const val btnFarmAutoAtk = "自动战斗"
const val btnFarmAutoAtkCancel = "自动战斗取消"
const val btnFarmAutoStartConfirm = "自动战斗开始确认"
const val btnMapMonsterEssence = "地图指引精华NPC"
const val btnSceneYWMenuExpand = "遗忘副本菜单展开"
const val btnMapGBWJBlacksmith = "古堡铁匠分解"
const val btnMapGBWJBlacksmithSubmit = "古堡铁匠分解确认"
const val btnMapGBWJSceneEnter = "古堡进入"
const val btnMapGBWJSceneEnterSubmit = "古堡进入确认"
const val btnNpcAssist = "副本系统援助"
const val btnMapToHome = "地图回主城按钮"
const val btnMapToHomeSubmit = "地图回主城确认按钮"
const val btnMenuZDZF = "菜单战斗祝福"
const val btnMenuZDZFCSZF = "菜单传世祝福"
const val btnMenuZDZFCSZFTake = "菜单传世祝福获取贡献"
const val btnMenuZDZFCSZFTakeGo = "菜单传世祝福挑战魔神"



fun takeBtn(name: String?): Block? {
    return when (name) {
        btnAtk -> GComponents.get().abPanel.atk.view
        btnSkillA -> GComponents.get().abPanel.skillA.view
        btnSkillB -> GComponents.get().abPanel.skillB.view
        btnSkillC -> GComponents.get().abPanel.skillC.view
        btnSkillD -> GComponents.get().abPanel.skillD.view
        btnSkillE -> GComponents.get().abPanel.skillE.view
        btnSkillF800 -> GComponents.get().abPanel.skillF800.view
        btnSkillF800b -> GComponents.get().abPanel.skillF800B.view
        btnInteract -> GComponents.get().abPanel.interact.view
        btnMedicine -> GComponents.get().abPanel.medicine.view
        btnInviteConfirm -> CComponents.inviteConfirm
        btnInviteCancel -> CComponents.inviteCancel
        btnReviveInHere -> CComponents.reviveInHere
        btnReviveInCity -> CComponents.reviveInCityFixedClick // 避免点起说话
        btnSceneStartEnter -> bsBtnSceneEnter ?: cacheSceneEnterBlock
        btnSceneStartEnterClose -> GComponents.get().sceneEnterClose
        btnScreenCenter -> CComponents.centerButton
        btnSkipAnim -> GComponents.get().skippable
        btnRocker -> GComponents.get().rocker
        btnBlacksmithStart -> GComponents.get().equipmentDecompositionCenter
        btnBlacksmithSubmit -> GComponents.get().equipmentDecompositionSubmit
        btnCastleBlacksmithClose -> GComponents.get().menuCastleClearUpClose
        btnSceneRestart -> CComponents.buttonSceneGoOn
        btnSceneRestartClose -> CComponents.buttonSceneMenuClose
        btnSceneImmRestart -> CComponents.buttonImmGoOn
        btnSceneStartNormal -> CComponents.sceneStartNormal
        btnSceneStartHard -> CComponents.sceneStartHard
        btnRandomBuff -> CComponents.sceneRandomButton
//        btnAtvConfirm -> CComponents.activeOkButton
        btnCloseable -> bsBtnCloseable
        btnSceneExitLarge -> GComponents.get().largeSceneFlag
        btnSceneExit -> GComponents.get().sceneFlag
        btnReviveByOtherAccept -> CComponents.reviveByOtherAccept
        btnReviveByOtherCancel -> CComponents.reviveByOtherCancel
        btnImmBackEnter -> CComponents.immBackEnter
        btnImmFastRestart -> CComponents.immFastRestart
        btnCenterTop -> GComponents.get().centerTop
        btnEditFriendClose -> CComponents.checkFriendClose
        btnApplyAccept -> GComponents.get().applyAccept
        btnApplyRefuse -> GComponents.get().applyRefuse
        btnApplyMenu -> GComponents.get().applyMenu
        btnApplyPopMenu -> GComponents.get().applyPopMenu
        btnPopTxtCancel -> CComponents.waitOtherCancel
        btnPopTxtConfirm -> CComponents.waitOtherConfirm
        btnCastleEnterMode2 -> GComponents.get().buttonCastleEnterMode2
        btnReviveInCenter -> CComponents.reviveInCenter
        btnRDSceneFastAgain -> GComponents.get().fastAgainBtn
        btnSceneInviteGroupAllClose -> CComponents.sceneInviteGroupAllClose
        btnMenuPackage -> GComponents.get().menuPackage
        btnMenuPackageTab3 -> GComponents.get().menuPackageTab3
        btnMenuPetPack -> GComponents.get().petPackMenu
        btnMenuPetBlacksmith -> GComponents.get().petPackBlacksmith
        btnMenuPetBlacksmithSubmit -> GComponents.get().petEquipmentDecompositionSubmit2
        btnPopApplyClose -> CComponents.popApplyClose
        btnImmDailySign -> GComponents.get().immDailyButton
        btnImmCheckPart2 -> GComponents.get().buttonCheckPart2Imm
        btnImmBuffCenter -> GComponents.get().immWordCenterButton
        btnImmBuffSkip -> GComponents.get().immWordSkipButton
        btnImmKeyCancel -> GComponents.get().immKeyCancel
        btnMYStart -> GComponents.get().sceneMYMZStart
        btnTzCheckPart2 -> GComponents.get().buttonCheckPart2Tz
        btnTzNext -> GComponents.get().tzNextLv
        btnTzNextPre  -> GComponents.get().tzNextPreLv
        btnMenuKeyToEnter -> GComponents.get().menuKeyToImmButton
        btnReopenGame -> CComponents.reopenGame
        btnReopenGameRole -> CComponents.reopenGameRole
        btnNetError -> CComponents.netError
        btnInviteBlackClose -> CComponents.blackInviteClose
        btnSelectRole -> GComponents.get().selectRole
        btnExitRole -> GComponents.get().roleExitClose
        btnMenuMain -> GComponents.get().mainMenu
        mainMenuXianZu -> GComponents.get().mainMenuXianZu
        btnMenuXianZuBaoDianA -> GComponents.get().mainMenuXianZuBaoDianA
        btnMenuXianZuBaoDianB -> GComponents.get().mainMenuXianZuBaoDianB
        btnMenuXianZuBaoDianTopA -> GComponents.get().mainMenuXianZuBaoDianTopA
        btnMenuXianZuBaoDianTopB -> GComponents.get().mainMenuXianZuBaoDianTopB
        btnMenuLXDot -> GComponents.get().mainMenuLXDot
        btnLXUse -> GComponents.get().btnLXUse
        btnLxAtvTipClose-> GComponents.get().btnLxAtvTipClose
        btnPathfinding -> CComponents.pathfinding
        btnLxTempEnter1 -> CComponents.lxTempEnter1
        btnLxTempEnter2 -> CComponents.lxTempEnter2
        btnMenuSettings -> GComponents.get().settingsMenu
        btnMenuGroup-> GComponents.get().groupMenu
        btnMenuGroupQuickStart -> GComponents.get().groupQuickStart
        btnMenuSwitchRole -> GComponents.get().switchRole
        btnMYBLMenuJH -> GComponents.get().myblSubmitJH
        btnMYBLMenuFJ -> GComponents.get().myblSubmitFJ
        btnMYBLMenuFJSubmit -> GComponents.get().myblSubmitFJSubmit
        btnMYBLOpenState -> GComponents.get().myblOpenState
        btnSceneHideState -> GComponents.get().sceneHideState
        btnSceneOpenState-> GComponents.get().sceneOpenState
        btnSmallMap -> GComponents.get().smallMap
        btnMapGlassToOpen -> GComponents.get().mapGlassToOpen
        btnMapGlassOpened -> GComponents.get().mapGlassOpened
        btnMapGuideItem1 -> GComponents.get().mapGuideItem1
        btnMapGoTarget -> GComponents.get().mapGoTarget
        btnFarmAutoAtk -> GComponents.get().farmAutoAtk
        btnFarmAutoAtkCancel -> GComponents.get().farmAutoAtkCancel
        btnFarmAutoStartConfirm -> GComponents.get().farmAutoStartConfirm
        btnMapMonsterEssence -> blockMapMonsterEssenceBtn
        btnMapGBWJBlacksmith -> GComponents.get().mapGBWJBlacksmith
        btnMapGBWJBlacksmithSubmit -> GComponents.get().mapGBWJBlacksmithSubmit
        btnMapGBWJSceneEnter -> GComponents.get().mapGBWJSceneEnter
        btnMapGBWJSceneEnterSubmit -> GComponents.get().mapGBWJSceneEnterSubmit
        btnNpcAssist -> npcAssistBlock
        btnMapToHome -> GComponents.get().mapToHomeBtn
        btnMapToHomeSubmit -> GComponents.get().mapToHomeSubmitBtn
        btnMenuZDZF -> GComponents.get().menuZDZF
        btnMenuZDZFCSZF -> GComponents.get().menuZDZFCSZF
        btnMenuZDZFCSZFTake -> GComponents.get().menuZDZFCSZFTake
        btnMenuZDZFCSZFTakeGo -> GComponents.get().menuZDZFCSZFTakeGo
        else -> null
    }
}

